/**
 * @param {string} allowed
 * @param {string[]} words
 * @return {number}
 */
var countConsistentStrings = function (allowed, words) {
    // 字符串去重
    let arr = words.map((val) => {
        return [... new Set(val)].join("")
    })
    let count = 0
    arr.forEach(el => {
        for (let i = 0; i < el.length; i++) {
            if (allowed.indexOf(el[i]) == -1) {
                count--
                break
            }
        }
        count++
    })
    return count
};